﻿<phone:PhoneApplicationPage 
    x:Class="TrafficCamsFlanders.MainPage" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True" d:DesignHeight="696" d:DesignWidth="480">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="Traffic Cams Flanders" Margin="0,0,0,25">
            <!--Pivot item one-->
            <controls:PivotItem Header="Antwerpen">
                <!--Double line list with text wrapping-->
                <ListBox x:Name="Antwerpenlbx" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="Antwerpenlbx_SelectionChanged" >
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="200">
                                <Image Source="{Binding getImage}" Margin="0,0,0,0" Stretch="Uniform" MaxHeight="200" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding getName}" Margin="200,-160,0,0" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Right" HorizontalAlignment="Right" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
 
            <!--Pivot item two-->
            <controls:PivotItem Header="Brussel"> 
                <!--Triple line list no text wrapping-->
                    <ListBox x:Name="Brussellbx" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="Brussellbx_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="200">
                                <Image Source="{Binding getImage}" Margin="0,0,0,0" Stretch="Uniform" MaxHeight="200" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding getName}" Margin="200,-160,0,0" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Right" HorizontalAlignment="Right" />
                            </StackPanel>
                        </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
            </controls:PivotItem>

            <controls:PivotItem Header="Gent">
                <!--Triple line list no text wrapping-->
                <ListBox x:Name="Gentlbx" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="Gentlbx_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="200">
                                <Image Source="{Binding getImage}" Margin="0,0,0,0" Stretch="Uniform" MaxHeight="200" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding getName}" Margin="200,-160,0,0" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Right" HorizontalAlignment="Right" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>


            <controls:PivotItem Header="Lummen">
                <!--Triple line list no text wrapping-->
                <ListBox x:Name="Lummenlbx" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="Lummenlbx_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="200">
                                <Image Source="{Binding getImage}" Margin="0,0,0,0" Stretch="Uniform" MaxHeight="200" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding getName}" Margin="200,-160,0,0" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Right" HorizontalAlignment="Right" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>

            <!--favs-->
            <controls:PivotItem Header="Favorites">
                <!--Double line list with text wrapping-->
                <ListBox x:Name="Favoriteslbx" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="Favoriteslbx_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="200">
                                <Image Source="{Binding getImage}" Margin="0,0,0,0" Stretch="Uniform" MaxHeight="200" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding getName}" Margin="200,-160,0,0" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" TextAlignment="Right" HorizontalAlignment="Right" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
        </controls:Pivot>
        <TextBlock Height="29" HorizontalAlignment="Center" Margin="12,667,0,0" Name="textBlock1" Text="http://m.filebeeld.be" VerticalAlignment="Top" Width="456" TextAlignment="Center" Tap="textBlock1_Tap" />
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/appbar.refresh.rest.png" Text="refresh" Click="ApplicationBarIconButton_Click"/>
            <shell:ApplicationBarIconButton IconUri="/appbar.favs.addto.rest.png" Text="add favorite" Click="ApplicationBarIconButton_Click_1"/>
            <shell:ApplicationBarIconButton IconUri="/appbar.pin.rest.png" Text="add live tile" Click="ApplicationBarIconButton_Click_2"/>
             <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="edit favorites" Click="ApplicationBarMenuItem_Click_1"/>
                <shell:ApplicationBarMenuItem Text="about" Click="ApplicationBarMenuItem_Click"/>
                <shell:ApplicationBarMenuItem Text="help" Click="ApplicationBarMenuItem_Click_2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>